import request from '@/router/axios';

export const add = (data) => {
    return request({
        url: '/api/user-api/mx-menu/insert',
        method: 'post',
        data
    })
}

export const update = (data) => {
    return request({
        url: '/api/user-api/mx-menu/update',
        method: 'post',
        data
    })
}


export const getMenuList = (params) => {
    return request({
        url: '/api/user-api/mx-menu/list',
        method: 'get',
        params
    })
}

export const getMenuTree = (params) => {
    return request({
        url: '/api/user-api/mx-menu/tree',
        method: 'get',
        params
    })
}


export const del = (data) => {
    return request({
        url: '/api/user-api/mx-menu/delete',
        method: 'post',
        params: data
    })
}

export const getDetail = (params) => {
    return request({
        url: '/api/user-api/mx-menu/detail',
        method: 'get',
        params
    })
}
export const getUserCollect = (params) => {
    return request({
        url: '/api/user-api/mx-user/get-user-collect',
        method: 'get',
        params
    })
}

export const save = (data) => {
    return request({
        url: '/api/user-api/mx-menu-party-collect/insert',
        method: 'post',
        data: data
    })
}

export const getJurisdiction = (params) => {
    return request({
        url: '/api/user-api/mx-menu-party-collect/page',
        method: 'get',
        params
    })
}

export const getJurisdictionDetails = (params) => {
    return request({
        url: '/api/user-api/mx-menu-party-collect/detail',
        method: 'get',
        params
    })
}

export const delJurisdiction = (data) => {
    return request({
        url: '/api/user-api/mx-menu-party-collect/delete',
        method: 'post',
        data: data
    })
}
export const updateMenuAuth = (data) => {
    return request({
        url: '/api/user-api/mx-menu-party-collect/update',
        method: 'post',
        data: data
    })
}
